<script type="text/javascript" src="${base}/scripts/xsgl/nbxsddetail.js"></script>
<div id="nbxsd_tabs" class="easyui-tabs" detail="true" data-options="fit:true,border:false">
<input type="hidden" id="nbxsd_id" value="${(xsd.id)!}"/>
<input type="hidden" id="nbxsd_xsdh" value="${(xsd.xsdh)!}"/>
<input type="hidden" id="nbxsd_ewmtime" value="${(ewmtime)!}"/>

<div title="销售信息">
    <table style="width: 100%" class="tb tab-t t-bor">
        <col width="70px"/>
        <col width=""/>
        <col width="70px"/>
        <col width=""/>
        <col width="70px"/>
        <col width=""/>
        <tr>
            <th>
                销售单号：
            </th>
            <td colspan="3">
            ${(xsd.xsdh)!}
            </td>
            <th>销售类型：</th>
            <td>内部销售</td>
        </tr>
        <tr>
            <th>采购公司：</th>
            <td>
            ${(xsd.kh.qc)!}
            </td>
            <th>采购部门：</th>
            <td>${(xsd.khbm.qc)!}</td>
            <th>提货仓库：</th>
            <td> ${(xsd.thck.mc)!} </td>
        </tr>
        <tr>
            <th>开单日期：</th>
            <td>
            ${(xsd.sxsj?date)!}
            </td>
            <th>计划发货：</th>
            <td>
            ${(xsd.fhsj?date)!}
            </td>
            <th>税&nbsp;率(%)：</th>
            <td>
            ${(xsd.sl?string("0.0000"))!}
            </td>
        </tr>
        <tr>
            <th>发运责任：</th>
            <td>
            ${(xsd.fyzr.z)!}
            </td>
            <th>代收费用：</th>
            <td>
            ${(xsd.dsyfje?string(",##0.0000"))!}
            </td>
            <th>提&nbsp;货&nbsp;&nbsp;人：</th>
            <td>
            ${(xsd.thr)!}
            </td>
        </tr>
        <tr>
            <th>交货时间：</th>
            <td>
            ${(xsd.jhsj?date)!}
            </td>
            <th>送货地址：</th>
            <td colspan="3">
            ${(xsd.jhdz)!}
            </td>

        </tr>
        <tr>
            <th>收&nbsp;货&nbsp;&nbsp;人：</th>
            <td>
            ${(xsd.shry)!}
            </td>
            <th>联系电话：</th>
            <td>
            ${(xsd.shrdh)!}
            </td>
            <th>交货要求：</th>
            <td>
            ${(xsd.jhyq)!}
            </td>
        </tr>
        <tr>
            <th>申报公司：</th>
            <td>
                ${(xsd.sbgs.jc)!}
            </td>
            <th>申报部门：</th>
            <td>
                ${(xsd.sbbm.qc)!}
            </td>
            <th>申&nbsp;报&nbsp;&nbsp;人：</th>
            <td>
                ${(xsd.sbr.xm)!}
            </td>
        </tr>
        <tr>
            <th>销售公司：</th>
            <td>
            ${(xsd.xsgs.jc)!}
            </td>
        </tr>
        <tr>
            <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
            <td colspan="5">
            ${(xsd.bz)!}
            </td>
        </tr>
        <tr>
            <th>制&nbsp;单&nbsp;&nbsp;人：</th>
            <td>${(xsd.createUser.xm)!}</td>
            <th>制单时间：</th>
            <td>${(xsd.dateCreated?datetime)!}</td>
        </tr>
    </table>
</div>
<div title="销售明细">
    <table id="nbxsd_xsdmx_table">
    </table>
</div>
<div title="费用明细">
    <table id="nbxsd_xsdfy_table" class="easyui-datagrid" url="${base}/xsgl/nbxsd/nbxsd_xsfy?xsdId=${(xsd.id)!}"
           rownumbers="true" fit="true" fitColumns="true" showFooter="true">
        <thead>
        <tr>
            <th data-options="field:'sydw.qc',width:50">收益单位</th>
            <th data-options="field:'fylb.fykmjc',width:50">费用类别</th>
            <th data-options="field:'jfsl',width:30,formatter:formatSlForHtml">计费数量</th>
            <th data-options="field:'dj',width:30,formatter:formatJeForHtml">单价(元)</th>
            <th data-options="field:'je',width:30,formatter:formatJeForHtml">金额(元)</th>
            <th data-options="field:'bz',width:50">备注</th>
        </tr>
        </thead>
    </table>
</div>
<div title="销售单打印">
    <div id="xsdy-toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><span class="xuan">选择打印机：</span>
                    <select class="ze" name="" style="">
                        <option>——默认——</option>
                    </select>
                </li>
                <li><a class="she" href="javascript:void(0);" onclick="checkIsInstall('NBXSD')">检查插件</a></li>
                <li><a class="watch" href="javascript:void(0);" onclick="xsdyPrintPreview()">打印</a></li>
            </ul>
            <ul class="niu">
                <li><a href="javascript:void(0);" class="rep" plain="true"
                       onclick="nbcslClick1('cksl_name');">出售联</a></li>
            <#--   <li><a href="javascript:void(0);" class="rep" plain="true"
            onclick="jzlClick('cksl_name');">记账联</a></li>-->
                <li><a href="javascript:void(0);" class="rep" plain="true"
                       onclick="nbthdClick1('cksl_name');">提货单</a></li>
                <li><a href="javascript:void(0);" class="rep" plain="true"
                       onclick="nbshdClick1('cksl_name');">送货单</a></li>
            </ul>

        </div>
        <div id="nbxsdy_id">
            <object id="NBXSD_LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
                <embed id="NBXSD_LODOP_EM" type="application/x-print-lodop" width=0 height=0
                       pluginspage="install_lodop32.exe"></embed>
            </object>

            <div id="nbxsdy_print_id" class="textcon">
                <table id="xsdy_print_table" class="tb" style="width: 100%;font-size:13px;">
                    <input id="xsd_thck_detail" type="hidden" value="${(xsd.thck.mc)!}">
                    <input id="xsd_thzckdz_detail" type="hidden" value="${(xsd.thck.dz)!}">
                    <input id="xsd_bz" type="hidden" value="${(xsd.bz)!}">
                    <input id="ysgjList" type="hidden" value="${(xsd.psd.shch)!}"/>
                    <tbody>
                    <colgroup>
                        <col width="10%;"/>
                        <col width="27%"/>
                        <col width="15%;"/>
                        <col width="20%"/>
                        <col width="12%;"/>
                        <col width="23%"/>
                    </colgroup>
                    <tbody>
                    <tr>
                        <th>供应单位:</th>
                        <td><input id="xsddetail_xsgs" class="input-tian" readonly="readonly"
                                   value="${(xsd.sbgs.qc)!}"/></td>
                        <td rowspan="3" colspan="2" style="text-align: center;font-size: 18px">
                            <span id="xsddy_csl" style="font-size: 20px;">${(xsd.xsgs.qc)!}物资出库单(销售)</span>
                            <span id="xsddy_thd" style="font-size: 20px;display: none">${(xsd.xsgs.qc)!}物资出库单(销售)</span>
                            <span id="xsddy_shd" style="font-size: 20px;display: none">${(xsd.xsgs.qc)!}物资出库单(送货)</span>
                        </td>
                        <th>售料单编号:</th>
                        <td><input id="xsddetail_xsdh" class="input-tian" readonly="readonly"
                                   value="${(xsd.xsdh)!}"/></td>
                    </tr>
                    <tr>
                        <th>购料单位:</th>
                        <td><input id="xsddetail_kh" class="input-tian" readonly="readonly" value="${(xsd.kh.qc)!}"/>
                        </td>
                        <th>制单日期:</th>
                        <td><input id="xsddetail_sxsj" class="input-tian" readonly="readonly"
                                   value="<#if xsd??>${(xsd.dateCreated?date)!}</#if>"/></td>
                    </tr>
                    <tr>
                        <th>提货仓库:</th>
                        <td><input id="xsddetail_thck" class="input-tian" readonly="readonly"
                                   value="${(xsd.thck.mc)!}"/></td>
                        <th>发货日期:</th>
                        <td><input id="xsddetail_jhrq" class="input-tian" readonly="readonly"
                                   value="<#if xsd??>${(xsd.fhsj?date)!}</#if>"/></td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div id="nbxsdy_xsd_id" class="textcon"></div>


            <div id="nbxsdy_detail_id" class="textcon">
                <table class="tb" style="width: 100%;font-size:13px;">
                    <colgroup>
                        <col width="10%;"/>
                        <col width="15%"/>
                        <col width="10%;"/>
                        <col width="15%"/>
                        <col width="10%;"/>
                        <col width="15%"/>
                    </colgroup>
                    <tbody>
                    <tr>
                        <th style="font-size: 12px;">备注:</th>
                        <td>
                            <input id="xsddy_bz" class="input-tian" readonly="readonly"
                                   value="${(xsd.bz)!} ${(xsd.gc.mc)!}"/>
                        </td>
                    </tr>
                    <tr>
                        <th style="font-size: 12px;">提货人:</th>
                        <td>
                            <input id="xsddy_thr" class="input-tian" readonly="readonly" value="${(xsd.thr)!}"/>
                        </td>
                        <th style="font-size: 12px;">发料员:</th>
                        <td>
                            <input id="xsddy_fly" class="input-tian" readonly="readonly" value="${(xsd.ckr.xm)!}"/>
                        </td>
                        <th style="font-size: 12px;">制单人:</th>
                        <td>
                            <input id="xsddy_zdr" class="input-tian" readonly="readonly"
                                   value="${(xsd.createUser.xm)!}"/>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td colspan="1"></td>
                        <th></th>
                        <td>${(currentTime?string('yyyy-MM-dd HH:mm:ss'))!}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</div>